<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.itheima.springboottilasmanager.mapper.DeptMapper">
    <insert id="addDept">
        insert into dept values(null,#{name},#{createTime},#{updateTime})
    </insert>
    <update id="updateDept">
        update dept set name = #{name},update_time=#{updateTime}
        where id = #{id}
    </update>


    <delete id="deleteDept">
        delete from dept where id = #{id}
    </delete>
    <select id="selectCount">
#         select id, name, create_time as createtime, update_time  as updatetime from dept
        select *
        from dept
        where id = #{id}
    </select>
</mapper>